-
Notifications
You must be signed in to change notification settings - Fork 187
Implement dscratch0 and dscratch1 CSRs for RISC-V #370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement dscratch0 and dscratch1 CSRs for RISC-V #370
Conversation
|
Maybe this is a good opportunity for a macro like Also, rebase this branch with master. It should pass all the CI checks. |
|
Thanks! and that's a good idea! I will soon push the changes with this macro added and being used for the dscratch0 and 1 codes! I'll also rebase with master so the CI is happy again :) |
a874ab7 to
5f5330f
Compare
|
Oops! Seems like I broke something... I'll fix this ASAP |
|
Hola! @romancardenas, I’ve rebased my branch onto upstream/master and Git reports that everything is already up-to-date: git rebase upstream/master
Current branch dscratch0_and_dscratch1 is up to date.The CI’s main tests pass, but those two lints still fail. Edit: Why can't we just use clippy stable? or pin the version if clippy nightly is strictly needed? |
riscv/src/register/dscratch0.rs
Outdated
| fn test_dscratch0_read_write() { | ||
| for i in 0..usize::BITS { | ||
| let val = 1usize << i; | ||
| let _ = unsafe { try_write(val) }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the test check that the result is an Unimplemented error at least
riscv/src/register/dscratch1.rs
Outdated
| fn test_dscratch1_read_write() { | ||
| for i in 0..usize::BITS { | ||
| let val = 1usize << i; | ||
| let _ = unsafe { try_write(val) }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, check that the error is of the kind Unimplemented
Clippy is a tool that helps us developing high quality code and avoid unwanted patterns. While I agree with you it is annoying when a brand new lint fails, I think it is valuable to have continuous improvement of the tool, as it serves for improving our project. |
|
BTW please do not fix the clippy lint that fails. It will be fixed in another PR. Once merged, you can rebase from master and get the patch for you. |
|
Thanks for the review! @romancardenas I have updated the tests as instructed! |
|
@KushalMeghani1644 rebase from master, now CI should pass |
…and dcsratch1 to use them instead of read_write_csr macro
Co-authored-by: Román Cárdenas Rodríguez <[email protected]>
7a0d80f to
f8565d9
Compare
|
DONE! @romancardenas I have rebased from master and all the CI checks pass! Is there any other change to be made? |
This PR implements the dscratch0 and dscratch 1 CSRs
Related to #1